package com.motorola.accessories;

import android.content.Context;
import android.preference.Preference;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.TextView;

public class DeleteAccessoriesEntry extends Preference {
    private CheckBox check = null;
    private int mId = 0;

    public DeleteAccessoriesEntry(Context context, String sw_version, int id) {
        super(context);
        // TODO Auto-generated constructor stub
        this.setSummary(sw_version);
        mId = id;
    }
    protected View onCreateView(ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
        View view = inflater.inflate(R.layout.delete_entry, null );
        check = (CheckBox)view.findViewById(R.id.check);
        TextView title = (TextView)view.findViewById(R.id.title);
        title.setText("sssf");
        TextView summary = (TextView)view.findViewById(R.id.summary);
        title.setText("fffs");
        summary.setText(getSummary());
        return view;
    }
    public boolean isChecked(){
        if (check != null) {
            return check.isChecked();
        }
        return true;
    }
    public int getId(){
        return mId;
    }
}
